package com.daocheng.weblog.web.service.impl;

import com.daocheng.weblog.common.domain.dos.BlogSettingsDO;
import com.daocheng.weblog.common.domain.mapper.BlogSettingsMapper;
import com.daocheng.weblog.common.utils.Response;
import com.daocheng.weblog.web.convert.BlogSettingsConvert;
import com.daocheng.weblog.web.model.vo.blogsettings.FindBlogSettingsDetailRspVO;
import com.daocheng.weblog.web.service.BlogSettingsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @ClassName BlogSettingsServiceImpl
 * @author: 稻城
 * @date: 2025/3/12
 * @Version 1.0
 * @description: TODO
 */
@Service
@Slf4j
public class BlogSettingsServiceImpl implements BlogSettingsService {
    @Autowired
    private BlogSettingsMapper blogSettingsMapper;

    @Override
    public Response findDetail() {
        //获取数据
        BlogSettingsDO blogSettingsDO = blogSettingsMapper.selectById(1L);
        //DO转VO
        FindBlogSettingsDetailRspVO vo = BlogSettingsConvert.INSTANCE.convertDO2VO(blogSettingsDO);
        return Response.success(vo);
    }
}
